import request from '@/utils/request'
//获取一级分类
export const reqCategoryList = ()=>{
  return request.get(`/admin/product/getCategory1`)
}
//获取二级分类
export const reqCategoryList1 = (category1Id) =>{
  return request.get(`/admin/product/getCategory2/${category1Id}`)
}
//获取三级分类
export const reqCategoryList2 = (category2Id)=>{
  return request.get(`/admin/product/getCategory3/${category2Id}`)
}
//获取商品详情列表GET /admin/product/attrInfoList/{category1Id}/{category2Id}/{category3Id}
export const getAttrInfoList = (params) =>{
  return request.get(`/admin/product/attrInfoList/${params.category1Id}/${params.category2Id}/${params.category3Id}`)
}
//删除商品列表 DELETE /admin/product/deleteAttr/{attrId}
export const deleteAttr = (attrId)=>{
  return request.delete(`/admin/product/deleteAttr/${attrId}`)
}
//保存数据  /admin/product/saveAttrInfo
export const saveAttrInfo = (data)=>{
  return request.post(`/admin/product/saveAttrInfo`,data)
}